:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --bg-gradient: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-gradient);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

#chatbox {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 60vh;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.message {
    margin: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    max-width: 70%;
    position: relative;
    transition: transform 0.2s ease;
}

.user-message {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
}

.assistant-message {
    background: #fff;
    border: 1px solid #e2e8f0;
    margin-right: auto;
    box-shadow: var(--shadow-md);
}

#input-box {
    gap: 1rem;
    margin-top: 1.5rem;
}

#user-input {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

#user-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    background: var(--primary-color);
    transition: all 0.2s ease;
    font-weight: 500;
}

button:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* 滚动条美化 */
#chatbox::-webkit-scrollbar {
    width: 8px;
}

#chatbox::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
}

#chatbox::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}